import request from '@/utils/request'

export default {
  // 获取用户列表
  getUserList(params) {
    return request({
      url: '/educenter/frontmember/list',
      method: 'get',
      params: params
    })
  },

  // 获取用户详情
  getUserById(id) {
    return request({
      url: `/educenter/frontmember/${id}`,
      method: 'get'
    })
  },

  // 更新用户信息
  updateUser(user) {
    return request({
      url: '/educenter/frontmember/update',
      method: 'post',
      data: user
    })
  },

  // 切换用户状态
  toggleUserStatus(id) {
    return request({
      url: `/educenter/frontmember/toggleStatus/${id}`,
      method: 'post'
    })
  }
}